Community Curator/Source/TSWRes BGs
function Draw.BGs.Default() draw.clear(Col255(128, 164, 255)) end function Draw.BGs.Exit() draw.clear(Col255(10, 10, 100)) end function Draw.BGs.Loading() draw.clear(Col255(255, 255, 255)) draw.fillcircle(SizeX*.5, SizeY*.3, 24, PlayCol1) local Rand = math.random(1, #Strings.Loading) local RanString = Strings.LoadingRand draw.string(RanString, (SizeX*.5) - (draw.stringsize(RanString)/2), SizeY*.4, draw.black) end -- Create Mode Stuff -- -- Create Mode Start Menu function Draw.BGs.CStartMenu() draw.clear(Col255(128, 164, 255)) draw.fillroundedrect(32, 32, SizeX-32, SizeY-32, 4, draw.black) draw.roundedrect(32, 32, SizeX-32, SizeY-32, 4, PlayCol1) Draw.PodButton("", 32, 32, 64, 64, PlayCol1) draw.line(32,32,64,64,draw.red) draw.line(64,32,32,64,draw.red) Draw.PodButton(LevelTab"Name", 64, 32, SizeX-64, 64, PlayCol1) Draw.PodButton("Save", 64, 96, 128, 128, PlayCol1) Draw.PodButton("Return to Pod", 64, 160, 192, 192, PlayCol1) Draw.PodButton("Off",224, 160, 256, 192, PlayCol1) Draw.PodButton("Small", 256, 160, 288, 192, PlayCol1) end -- Create Mode Level Details Menu function Draw.BGs.CLDMenu() draw.clear(Col255(128, 164, 255)) draw.fillroundedrect(32, 32, SizeX-32, SizeY-32, 4, draw.black) draw.roundedrect(32, 32, SizeX-32, SizeY-32, 4, PlayCol1) Draw.PodButton("", 32, 32, 64, 64, PlayCol1) draw.line(32,32,64,64,draw.red) draw.line(64,32,32,64,draw.red) Draw.PodButton(LevelTab"Name", 64, 32, SizeX-64, 64, PlayCol1) Draw.StringBoxR(LevelTab"Description", 64, 64, SizeX - 64, SizeY-128, PlayCol1) Draw.PodButton("Labels", SizeX - 128, SizeY-96, SizeX - 32, SizeY-64, PlayCol1) Draw.PodButton("", 32, SizeY-96, 128, SizeY-32, PlayCol1) draw.fillcircle(64, (SizeY-64), 32, draw.white) Stickers[LevelTab"Icon" or "nil"](64, (SizeY-64), 32) end function Draw.BGs.CLDIconsMenu() draw.clear(Col255(128, 164, 255)) draw.fillroundedrect(32, 32, SizeX-32, SizeY-32, 4, draw.black) Draw.PodButton("", 32, 32, 64, 64, PlayCol1) draw.line(32,32,64,64,draw.red) draw.line(64,32,32,64,draw.red) Draw.PrintStickIcons(Stickers, 32, 64, SizeX-64,SizeY-32) end -- Labels Menu function Draw.BGs.CLDLabelsMenu() draw.clear(Col255(128, 164, 255)) draw.fillroundedrect(32, 32, SizeX-32, SizeY-32, 4, draw.black) Draw.PodButton("", 32, 32, 64, 64, PlayCol1) draw.line(32,32,64,64,draw.red) draw.line(64,32,32,64,draw.red) end -- Modal Menus -- -- Yes No Menu function Draw.BGs.YesNo(Title, Des, B1Col, B2Col, B1Txt, B2Txt) B1Txt, B2Txt = B1Txt or "Yes", B2Txt or "No" draw.clear(Col255(48, 48, 60)) draw.fillroundedrect(48, 48, SizeX-48, SizeY-48, 4, PlayCol1) draw.setfont("Arial", 24) draw.string(Title, (SizeX*.5) - (draw.stringsize(Title)/2), 48, draw.black) draw.setfont("Arial", 16) draw.string(Des, 48, 96, draw.black) Draw.PodButton(B1Txt, 48+24, SizeY-96, SizeX*.5, SizeY-48, B1Col) Draw.PodButton(B2Txt, SizeX*.5, SizeY-96, SizeX-(48+24), SizeY-48, B2Col) end -- Corrupted Profile Menu function Draw.BGs.CorruptProfile(ProfileOk, StoryOk, MMOk, ComOk) draw.clear() if not ProfileOk and not StoryOk and not MMOk and not ComOk then local Title = "Profile is corrupt or unloadable" draw.string(Title, (SizeX*.5) - (draw.stringsize(Title)/2), SizeY*.1, draw.black) else local Title = "Profile is corrupt or unloadable" draw.string(Title, (SizeX*.5) - (draw.stringsize(Title)/2), 0--SizeY*.1, draw.black) draw.string("Profile: "..tostring(ProfileOk), 16, 32, draw.black) draw.string("Story: "..tostring(StoryOk), 16, 48, draw.black) draw.string("My Moon: "..tostring(MMOk), 16, 64, draw.black) draw.string("Community: "..tostring(ComOk), 16, 80, draw.black) end end -- Menus -- -- Pod Control Menu function Draw.BGs.Pod() draw.clear(Col255(48, 48, 60)) Draw.PodButton("Community Moon", 24, 128, 128, 256, Col255(96, 96, 200)) DrCo.PlayerIcon(76, 180, 48, SavedFile.SFJSON"Icon") Draw.PodButton("Start Story", 128 + 24, 128, 128 + 128, 256, Col255(96, 96, 200)) Draw.PodButton("My Moon", 256 + 24, 128, 256 + 128, 256, Col255(96, 96, 200)) draw.fillcircle(280 + ((128 - 24)*.5), (128 + 64), 32, draw.white) Draw.PodButton("Pod", 384 + 24, 128, 384 + 72, 256, Col255(96, 96, 200)) Draw.PodButton("Settings", 0, SizeY - 32, 128, SizeY, PlayCol1) Draw.PodButton("Help", 128, SizeY - 32, 256, SizeY, PlayCol1) Draw.PodButton("Credits", 256, SizeY - 32, 384, SizeY, PlayCol1) Draw.PodButton("Exit", 384, SizeY - 32, SizeX, SizeY, PlayCol1) end -- Credits Menu function Draw.BGs.Credits() draw.clear(Col255(48, 48, 60)) Draw.PodButton("Back", 24, SizeY - 64, 128, SizeY - 32, PlayCol1) local Credits = Strings.Credits draw.setfont("Arial", 28) draw.string(Credits.Title, 24, 24, draw.blue) draw.setfont("Arial", 16) draw.string(Credits.SubTitle, 24, 64, draw.white) Draw.LuaIcon(SizeX-96, SizeY-96, SizeX-48, SizeY-48) draw.string(Credits.LuaURL, SizeX-128, SizeY-16, draw.white) end require "TSWRes BGs1" -- End of Community BGs -- function Draw.MMBC(Action) if MAction Action then return PlayCol2 end return PlayCol1 end -- My Moon function Draw.BGs.MyMoon() draw.clear(Col255(48, 48, 160)) Draw.PodButton("", 24, 32, SizeX-24, SizeY-32, PlayCol1) for k,v in ipairs(MyMoonLevels"SavedLevelTab") do Draw.PodButton("", 32, (32+LevScr+((k-1)*64)), SizeX-48, (32+LevScr+(k*64)), PlayCol1) draw.fillcircle(64, (64+LevScr+((k-1)*64)), 32, draw.white) Stickers[v"Icon" or "nil"](64, (64+LevScr+((k-1)*64)), 32) draw.string(v"Name", 96, (32+LevScr+((k-1)*64)), draw.white) draw.string(ObjRes.BytesPlus(v"Size"), 96, (48+LevScr+((k-1)*64)), draw.white) end Draw.PodButton("Back", 0, SizeY - 32, 128, SizeY, PlayCol1) Draw.PodButton("New", 0, 0, 128, 32, PlayCol1) Draw.PodButton("Delete", 128, 0, 256, 32, Draw.MMBC("Delete")) draw.fillrect(SizeX-32, 32, SizeX, 64, PlayCol2) draw.fillrect(SizeX-32, SizeY-64, SizeX, SizeY-32, PlayCol2) local SLT = SavedLevelTab end -- Story Menu function Draw.BGs.StoryMainMenu() draw.clear(Col255(StoryRes.StoryProg/100, StoryRes.StoryProg/100, StoryRes.StoryProg/100)) Draw.PodButton("Back", 24, SizeY - 64, 128, SizeY - 32, PlayCol1) Draw.ProgressBar(StoryRes.StoryProg/100, 128, SizeY-64, (SizeX-(48)), SizeY-32, draw.black) end -- The Settings Menu function Draw.BGs.Settings() draw.clear(Col255(48, 48, 60)) Draw.PodButton("Back", 24, SizeY - 64, 128, SizeY - 32, PlayCol1) end return -- Category:LittleBigPlanet Lua Source